package com.nexus.core.sys.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.nexus.core.query.annotation.QueryCondition;
import com.nexus.core.query.annotation.QueryType;
import com.nexus.core.service.dto.BaseDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据权限
 *
 * @Date 2025/7/28 15:08
 * @Author Administrator
 **/
@Data
@EqualsAndHashCode(callSuper = false)
public class SysDataRulesDTO extends BaseDTO {


    /**
     * 所属菜单
     */
    @ExcelProperty("所属菜单")
    @QueryCondition(tableField = "menu.id", type = QueryType.EQ)
    private SysMenuDTO menu;
    /**
     * 数据规则名称
     */
    @ExcelProperty("数据规则名称")
    @QueryCondition(tableField = "rule_name", type = QueryType.EQ)
    private String ruleName;
    /**
     * 规则mapper方法
     */
    @ExcelProperty("规则mapper方法")
    @QueryCondition(tableField = "mapper_class", type = QueryType.EQ)
    private String mapperClass;
    /**
     * 规则类型
     */
    @ExcelProperty("规则类型")
    @QueryCondition(tableField = "rule_type", type = QueryType.EQ)
    private String ruleType;
    /**
     * 规则字段
     */
    @ExcelProperty("规则字段")
    @QueryCondition(tableField = "rule_field", type = QueryType.EQ)
    private String ruleField;
    /**
     * 规则条件
     */
    @ExcelProperty("规则条件")
    @QueryCondition(tableField = "rule_condition", type = QueryType.EQ)
    private String ruleCondition;
    /**
     * 规则值
     */
    @ExcelProperty("规则值")
    @QueryCondition(tableField = "rule_value", type = QueryType.EQ)
    private String ruleValue;
    /**
     * 自定义sql
     */
    @ExcelProperty("自定义sql")
    @QueryCondition(tableField = "custom_sql", type = QueryType.EQ)
    private String customSql;
    /**
     * 组织机构
     */
    @ExcelProperty("组织机构")
    @QueryCondition(tableField = "org.id", type = QueryType.EQ)
    private SysOrgDTO org;
}